<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProjectTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
    {
        Schema::create('project',function(Blueprint $table){
            $table->increments('id') ;                  //项目标识
            $table->string('project_name')->unique();   //项目名称
            $table->string('project_intro')->nullable();            //项目简介
            $table->unsignedInteger('img_projectlogo_id')->nullable() ;  //项目logo
            $table->string('company_name')->nullable() ;            //公司名字
            $table->string('province')->nullable();                 //省份
            $table->string('city')->nullable() ;                    //所在城市
            $table->timestamp('create_time')->nullable() ;          //成立时间
            $table->integer('field_id')->nullable() ;               //行业领域
            $table->integer('phase_id')->nullable() ;               //项目所处阶段
            $table->string('project_status')->nullable() ;          //公司状态
            $table->text('project_desc')->nullable() ;              //项目介绍
            $table->text('project_lightspot')->nullable();          //项目亮点
            $table->text('project_future')->nullable() ;            //项目前景
            $table->string('project_tags')->nullable() ;            //项目标签
            $table->unsignedInteger('file_bp_id')->nullable() ;     //商业计划书
            $table->integer('invet_phase_id')->nullable();          //融资阶段
            $table->string('invet')->nullable();                    //融资金额
            $table->string('money_type')->nullable();               //货币单位
            $table->integer('sell_stock')->nullable();              //出让股权
            $table->integer('min_money')->nullable();               //最低融资
            $table->integer('invest_num')->nullable();              //投资方数量
            $table->timestamp('stop_time')->nullable();             //截止日期
            $table->timestamp('reginv_time')->nullable();           //申请时间
            $table->integer('is_finance')->nullable();              //是否申请融资
            $table->integer('is_speed_finance')->nullable();        //是否快速融资
            $table->text('other_desc')->nullable();                 //其它要求
            $table->integer('star_layer')->default(0);              //项目星级
            $table->integer('repay_rate')->default(0);              //回报率
            $table->string('phone')->nullable();                    //联系方式
            $table->integer('user_id')->nullable();         //用户id
            $table->integer('project_auth')->default(0);            //项目认证状态
            $table->integer('do_status')->default(0);               //操作状态
            $table->unsignedInteger('url_id')->nullable();          //url链接标识
            $table->softDeletes();
            $table->timestamps();
        });
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('project');
	}

}
